function editYuanGongupdate(id) {
			$.ajax({
				type:"get",
				url:"<%=basePath%>yuangong/edit.action",
				data:{"id":id},
				success:function(data) {  
					$("#yuangong_id").val(data.id);
					$("#yuangong_ygname").val(data.ygname);
					$("#yuangong_ygid").val(data.ygid);
					$("#yuangong_age").val(data.age);
					
					$("#yuangong_sex").val(data.sex);
					$("#yuangong_organization").val(data.organization);
					$("#yuangong_zhiwei").val(data.zhiwei);
					$("#yuangong_manager").val(data.manager);
					$("#yuangong_phone").val(data.phone);
					
				}
			});
		}
		
		
function editYuanGonginsert() {
	$.ajax({
		type:"get",
		url:"<%=basePath%>yuangong/insert.action",
		data:{},
		success:function(data) {  
			
			$("#yuangong_ygnameinsert").val(data.ygname);
			$("#yuangong_ygidinsert").val(data.ygid);
			$("#yuangong_ageinsert").val(data.age);
			
			$("#yuangong_sexinsert").val(data.sex);
			$("#yuangong_organizationinsert").val(data.organization);
			$("#yuangong_zhiweiinsert").val(data.zhiwei);
			$("#yuangong_managerinsert").val(data.manager);
			$("#yuangong_phoneinsert").val(data.phone);
			
		}
	});
}
	
		
	
		function updateYuanGong() {
			$.post("<%=basePath%>yuangong/update.action",$("#YuanGong_editupdate").serialize(),function(data){
				alert("客户信息更新成功！");
				window.location.reload();
			});
		}
		
		function insertYuanGong() {
			$.post("<%=basePath%>yuangong/insert.action",$("#YuanGong_editinsert").serialize(),function(data){
				alert("员工信息添加成功！");
				window.location.reload();
			});
		}
		
		function deleteYuanGong(id) {
			if(confirm('确实要删除该客户吗?')) {
				$.post("<%=basePath%>yuangong/delete.action",{"id":id},function(data){
					alert("客户删除更新成功！");
					window.location.reload();
				});
			}
		}
		
		
		
		
		function funinsert(i){
			
		
			if(i=='1'){
				
				
			}else{
				
				$.post("<%=basePath%>yuangong/selectManager.action",{"organization":i},function(data){
					
					$("#yuangong_managerinsert").val(data);
				},"json");
			}
			
			
			
		}
		function funupdate(i){
			
			
			if(i=='1'){
				
				
			}else{
				
				$.post("<%=basePath%>yuangong/selectManager.action",{"organization":i},function(data){
					
					$("#yuangong_managerupdate").val(data);
				},"json");
			}
			
			
			
		}